#!/usr/bin/env bash

GIT_REVISION="$1"
shift

if [ -z "$GIT_REVISION" ]; then
  exit 0
fi

VERSION_REGEX='v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[0-9a-z]+(-dirty)?$'
echo "$GIT_REVISION" | egrep -q "$VERSION_REGEX"
